package top.tsyz.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "Payment 实体类")
public class Payment {

    @ApiModelProperty(value = "支付ID")
    private Long id;

    @ApiModelProperty(value = "订单ID")
    private Long orderId;

    @ApiModelProperty(value = "支付流水号")
    @NotBlank(message = "支付流水号不能为空")
    @Size(max = 100, message = "支付流水号长度不能超过100个字符")
    private String paymentNo;

    @ApiModelProperty(value = "支付金额")
    private BigDecimal amount;

    @ApiModelProperty(value = "支付方式 1-支付宝 2-微信 3-银行卡")
    private Boolean paymentMethod;

    @ApiModelProperty(value = "支付状态 1-待支付 2-支付成功 3-支付失败 4-已退款")
    private Boolean status;

    @ApiModelProperty(value = "第三方支付流水号")
    @Size(max = 100, message = "第三方支付流水号长度不能超过100个字符")
    private String transactionNo;

    @ApiModelProperty(value = "支付完成时间")
    private Date paidAt;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "创建人")
    @Size(max = 50, message = "创建人长度不能超过50个字符")
    private String createUser;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "更新人")
    @Size(max = 50, message = "更新人长度不能超过50个字符")
    private String updateUser;

    @ApiModelProperty(value = "逻辑删除 0-未删除 1-已删除")
    private Boolean isDeleted;

}
